package miniBanco.Handler;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;


public abstract class abstractHandler {
	protected JFrame jPopUpFrame;
	
	public void openPopup(JPanel panel)
	{
		jPopUpFrame = new JFrame();
		jPopUpFrame.setBounds(0,0,800,600);
		jPopUpFrame.add(panel);
		jPopUpFrame.setVisible(true);
		jPopUpFrame.addWindowListener
        (
            new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                	jPopUpFrame.setVisible(false);
                }
            }
        );  
	}
}
